<template>
  <div>
    <h2>当前求和:{{ sum }}</h2>
    <button @click="sum++">点击+1</button>

    <h1>x:{{ point.x }} y: {{ point.y }}</h1>
    <hr />
  </div>
</template>
<script>
// import { ref,beforeCreate,created,beforeMount,mounted,beforeUpdate,updated,beforeDestroy,destroyed } from "vue";
import { ref} from "vue";
import usePoint from "../hooks/usePoint"
export default {
  name: "Demo",
  setup() {
    let sum = ref(0);

    let point = usePoint()
   //返回一个对象，常用
   return {
      sum, 
      point
    }
  },
  
  
};
</script>
  
  <style>
</style>
  
 